/*
 * @Author: xuchao 
 * @Date: 2018-05-16 14:10:53 
 * @Last Modified by: xuchao
 * @Last Modified time: 2018-06-22 14:43:39
 */
import React, { Component } from 'react';
import { Layout } from 'antd';
import './style.less';

export default class Activity extends Component {
    constructor(props){
        super(props)
        this.state = {
            type: ['嘉宾','大会日程','本届特色活动','往届回顾','合作伙伴'], 
            currentIndex: 0            
        }
    }

    tabToggle(index){
        this.setState({
            currentIndex: index
        })
    }     

    render() {
        const { type, currentIndex } = this.state;
        return (
            <Layout.Content className="aqnh">
                <div className="banner animated fadeIn" />
                <div className="menu">
                    <ul>
                        {
                            type && type.map((item, index) => {
                                return (
                                    <li className={currentIndex===index ? 'active' : ''} onClick={this.tabToggle.bind(this, index)} key={index}>
                                        {item}
                                    </li>
                                )
                            })
                        }
                    </ul>
                </div>
                <div className="img" style={{width: '100%'}}>
                    <img src={require('@/static/images/aqnh-1.jpg')} alt=""  style={{maxWidth: '100%'}}/>
                </div>
            </Layout.Content>
        );
    }
}